﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;


namespace OpenLinkCommon.UnitTest.Utilities
{
    using Windy.OpenLink;

    public class EmptyEnumeraleTest
    {
        [Fact()]
        public void EnumerableTest()
        {
            Assert.IsAssignableFrom<IEnumerable<object>>(EmptyEnumerable<object>.Enumerable);

            var test = EmptyEnumerable<object>.Enumerable.GetEnumerator();
            
            EnumeratorTest(test);
        }

        [Fact( )]
        public void EnumeratorTest()
        {
            EnumeratorTest(EmptyEnumerable<object>.Enumerator);
        }

        private void EnumeratorTest(IEnumerator<object> test)
        {
            Assert.IsAssignableFrom<IEnumerator<object>>(test);

            test.Reset();

            Assert.False(test.MoveNext());
        }

    }
}
